// routes/index.tsx
import { lazy } from 'react'
import type { RouteItem } from '../type/route'

 
const FaPiaoDetail= lazy(() => import( '../pages/Admin/FaPiao/FaPiaoDetail'))
const ZaiTuDetail= lazy(() => import( '../components/Detail/ZaiTuDetail'))
// import { DashboardOutlined, SettingOutlined } from '@ant-design/icons'

const Login = lazy(() => import("../pages/Login/Index"));
const Dashboard = lazy(() => import("../pages/Admin/Dashboard/Index"));
const User = lazy(() => import("../pages/Admin/User/Index"));
// const Product = lazy(() => import('../pages/Admin/Product/Index'))
const MainLayout = lazy(() => import('../layouts/MainLayout'))
const XunJiaDan = lazy(() => import('../pages/Admin/XunJiaDanGuanLi/Index'))
const AddXunDan = lazy(() => import('../pages/Admin/XunJiaDanGuanLi/AddXunDan'))
const DetailXundan = lazy(() => import('../pages/Admin/XunJiaDanGuanLi/DetailXundan'))
const DingDan = lazy(() => import('../pages/Admin/DingDanGuanLi/Index'))
const AddDingDan = lazy(() => import('../pages/Admin/DingDanGuanLi/AddDingDan'))
const ZaiTu = lazy(() => import('../pages/Admin/ZaiTuGenZong/Index'))
const HeTong = lazy(() => import('../pages/Admin/HeTongGuanLi/Index'))
const HuiDan = lazy(() => import('../pages/Admin/HuiDanGuanLi/Index'))
const JieSuan = lazy(() => import('../pages/Admin/JieSuanGuanLi/Index'))
const DingDanJieSuan = lazy(() => import('../pages/Admin/DingDanJieSuan/Index'))
const FaPiao = lazy(() => import('../pages/Admin/FaPiao/Index'))

const MainLayout = lazy(() => import("../layouts/MainLayout"));
const XunJiaDan = lazy(() => import("../pages/Admin/XunJiaDanGuanLi/Index"));
const DingDan = lazy(() => import("../pages/Admin/DingDanGuanLi/Index"));
const ZaiTu = lazy(() => import("../pages/Admin/ZaiTuGenZong/Index"));
const HeTong = lazy(() => import("../pages/Admin/HeTongGuanLi/Index"));
const HuiDan = lazy(() => import("../pages/Admin/HuiDanGuanLi/Index"));
const JieSuan = lazy(() => import("../pages/Admin/JieSuanGuanLi/Index"));
const DingDanJieSuan = lazy(
  () => import("../pages/Admin/DingDanJieSuan/Index")
);
const FaPiao = lazy(() => import("../pages/Admin/FaPiao/Index"));

export const routes: RouteItem[] = [
  {
    path: "/login",
    element: <Login />,
    hideInMenu: true,
  },
  {
    path: "/admin",
    name: "管理中心",
    element: <MainLayout />,
    children: [
      {
        path: "/admin/users",
        element: <User />, //个人中心
      },
      {
        path: '/admin/dashboard', element: <Dashboard />  //系统设置
      },

      {
        path: '/admin/xundanjia', element: <XunJiaDan />,

      }, //询价单管理
      {
        path: '/admin/addxundan', element: <AddXunDan />  //添加询价单
      },
      {
        path: '/admin/detailxundan', element: <DetailXundan />  //添加询价单
      },
      { path: '/admin/dingdan', element: <DingDan /> }, //订单管理
      {path: '/admin/adddingdan', element: <AddDingDan />},
      { path: '/admin/zaitu', element: <ZaiTu /> },// 在途跟踪
      { path: '/admin/huidan', element: <HuiDan /> },// 回单管理
      { path: '/admin/hetong', element: <HeTong /> },// 合同管理
      { path: '/admin/jiesuan', element: <JieSuan /> },// 结算管理
      { path: '/admin/dingdanjiesuan', element: <DingDanJieSuan /> },// 订单结算
      { path: '/admin/fapiao', element: <FaPiao /> },// 发票管理



    {path: '/admin/xundanjia',element: <XunJiaDan />}, //寻价单管理
    {path: '/admin/dingdan',element: <DingDan />}, //订单管理
    {path: '/admin/zaitu',element: <ZaiTu />},// 在途跟踪
    {path: '/admin/huidan',element: <HuiDan />},// 回单管理
    {path: '/admin/hetong',element: <HeTong />},// 合同管理
    {path: '/admin/jiesuan',element: <JieSuan />},// 结算管理
    {path: '/admin/dingdanjiesuan',name:'订单结算',element: <DingDanJieSuan />},// 订单结算
    {path: '/admin/fapiao',name:'发票管理',element: <FaPiao />,
    },// 发票管理

    {path: '/admin/fapiao/fapiaodetail', name:'申请开票', element: <FaPiaoDetail />} , // 发票详情
    {path: '/admin/fapiao/zaitudetail', name:'在途详情', element: <ZaiTuDetail />}  // 发票详情
    
 
     
    ]
  }
]
